import request from '@/router/axios';

export const getList = (page, size, params) => {
        return request({
            url: '/poster/sellerPoster/listPageManage',
            method: 'post',
            params: {
                ...params,
                page,
                size,
            }
        })
    }
    // 广告位表下拉框
export const getPosList = (isSell,apStatus,deleteStatus ) => {
    return request({
        url: '/poster/posterPos/listDicData',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            isSell,
            apStatus,
            deleteStatus
        }

    })
}
export const remove = (id) => {
    return request({
        url: '/poster/sellerPoster/delete',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            id,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/poster/sellerPoster/addItem',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/poster/sellerPoster/editItem',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: row
    })
}

//获取下拉列表的详情
export const getDetail = (id) => {
    return request({
        url: '/poster/posterPos/detail',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            id
        }
    })
}

//获取账户余额
export const getAmount = () => {
    return request({
        url: '/account/sellerUserAccount/detail',
        method: 'post',
        data: {}
    })
}

export const getlistPoster = (orderBy,adApId) => {
    return request({
        url: '/poster/sellerPoster/listPoster',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            orderBy,adApId
        }
    })
}

